using System.Runtime.Serialization;
using Microsoft.Xna.Framework;

namespace Xnatlas.Serialization
{
    [DataContract]
    public class AtlasStoreBitmap : ITextureWrapper
    {
        [DataMember]
        public string FileName { get; set; }
        [DataMember]
        public int X { get; set; }
        [DataMember]
        public int Y { get; set; }
        [DataMember]
        public int Width { get; set; }
        [DataMember]
        public int Height { get; set; }
        [DataMember]
        public string Data { get; set; }

        [IgnoreDataMember]
        public Rectangle AtlasAreaRectangle
        {
            get
            {
                return new Rectangle(X, Y, Width, Height);
            }
            set
            {
                X = value.X;
                Y = value.Y;
                Width = value.Width;
                Height = value.Height;
            }
        }
    }
}